<html>
	<head>
		<meta charset="utf-8" />
		<title>dom基础</title>
	</head>
	<body>
		<ul id="ul">
			<li></li>
		</ul>
	</body>
	<script>
		window.onload = function (){
			var ulObj = document.getElementById("ul");
			for(var i=0;i<ulObj.childNodes.length;i++){
				if(ulObj.childNodes[i].nodeType==1){
					ulObj.childNodes[i].style.background='red';
				}
			}
		}
	</script>
</html>